package cn.stu.cms.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

import static cn.stu.cms.common.CommonConstants.NO_CHOOSE_MSG;
import static cn.stu.cms.common.CommonConstants.NULL_MSG;

/**
 * 协商
 * (Negotiation)实体类
 *
 * @author gh
 * @date 2023/09/19
 */
@Data
public class Negotiation extends BaseEntity implements Serializable {

    /**
     * 协商标识
     */
    @TableId(type = IdType.AUTO)
    private Long negotiationId;

    /**
     * 员工id
     */
    @NotNull(message = NO_CHOOSE_MSG + "员工")
    private Long employeeId;

    /**
     * 员工姓名
     */
    private String employeeName;


    /**
     * 内容
     */
    @NotBlank(message = NULL_MSG + "协商内容")
    private String content;

    /**
     * 客户名称
     */
    private String customerName;
    /**
     * 客户ID
     */
    @NotNull(message = NO_CHOOSE_MSG + "客户")
    private Long customerId;

    /**
     * 协商时间
     */
    @NotNull(message = NO_CHOOSE_MSG + "协商时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime negotiationTime;
}

